<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>购物车-哇噻网</title>
		<meta name="description" content="创意礼物首选网站">
		<meta name="keywords" content="手工制作,购物,设计师,哇塞网">
		<meta name="author" content="haimi">
		<script src="./Public/Home/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="./Public/Bootstrap/Js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/order.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Bootstrap/Css/bootstrap.min.css"/>
		
		<!--载入hdjs(传输ajax)-->
		<link rel="stylesheet" href="./Public/hdjs/hdjs.css">
	    <script src="./Public/hdjs/hdjs.min.js"></script>
		
{{include file="../Common/head"}}
<!--END head-->


<!-- 使用新地址的模态框 -->
		<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  	<div class="modal-header">
		    	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		    	<h5 id="myModalLabel">使用新收货地址</h3>
		  	</div>
		  	
		  	<!--使用新地址的模态框-->
		  	<form onsubmit="return hd_submit(this,'{{U('Cart/useNewAddress')}}','{{U('confirmOrder')}}')">
			  	<div class="modal-body">
			    	<p>收货人：<input type="text" placeholder="请输入真实姓名" name="consignee" style="margin-left: 13px;width: 300px;"/></p>
			    	<p>收货地址：<input type="text" placeholder="输入收货地址" name="address"  style="width: 300px;"/></p>
			  	</div>
			  	<div class="modal-footer">
			    	<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
			    	<button  class="btn btn-primary">保存</button>
		  		</div>
		  	</form>
		  
		</div>
	<!--END 使用新地址的模态框-->


<form action="" method="post">

<!--shoppingCart-->
<div id="shoppingCart">
	<img src="./Public/Home/images/confirm_orderinfo_status.jpg"/>
	<div class="confirm_address">
		<!--<span>
			<a href="">管理收货地址</a>
		</span>-->
	</div>


<?php if(isset($_SESSION['address'])): ?>	
	<!--新地址的显示区域-->
	<ul class="newAddress">
		<li>
			<p><img src="./Public/Home/images/address_tubiao.jpg" style="padding:8px 5px 8px 5px;"/>
				寄送至：<span>{{$_SESSION['address']}}</span>
			    <span>{{$_SESSION['consignee']}}</span>收
			    <input type="hidden" name="address"  value="{{$_SESSION['address']}}" />
			    <input type="hidden" name="consignee"  value="{{$_SESSION['consignee']}}" />
			</p>
		</li>
	</ul>
	
	<!--END新地址的显示区域-->
<?php else: ?>

	<ul class="newAddress">
		<li>
			<p><img src="./Public/Home/images/address_tubiao.jpg" style="padding:8px 5px 8px 5px;"/>
				默认寄送至：<span>{{$data['address']}}</span>
			    <span>{{$data['username']}}</span>收
			    <input type="hidden" name="address"  value="{{$data['address']}}" />
			    <input type="hidden" name="consignee"  value="{{$data['username']}}" />
			</p>
		</li>
	</ul>

<?php endif ?>
	
	<p class="use_new_address">
		<!-- Button to trigger modal -->
		<a href="#myModal" role="button" class="btn" data-toggle="modal" style="width: 80px;background: #07C7D3;">使用新地址</a>
 
		
	</p>	
	
	
	<h1>
		<img src="./Public/Home/images/confirm_orderinfo_tit.jpg"  data-toggle="modal" data-target="#myModal" />
		
	</h1>		
	<div id="store">
		<ul class="confirm_order_content_tit">
			<li class="li_one">宝贝</li>
			<li class="li_two"></li>
			<li class="li_three">单价</li>
			<li class="li_four">数量</li>
			<li class="li_five"></li>
			<li class="li_six">小计（元）</li>
		</ul>
		<p class="confirm_order_content_storename">
			<!--店铺：
			<a href="">joydivision vintage</a>-->
		</p>
		
<!--如果有订单信息就显示，如果没有就显示提示-->		
<?php if(isset($_SESSION['cart'])): ?>
		<!--confirm order-->
		{{foreach from="$_SESSION['cart']['goods']" key="$k" value="$v"}}
			<div class="confirm_order_content_con ">
				<dl>
					<dt>
						<img src="{{$v['options']['listview']}}"/>
					</dt>
					<dd>
						<a href="content_{{$v['id']}}.html">{{$v['name']}}</a>
					</dd>
				</dl>
				<span class="confirm_order_content_wasaimoney"></span>
				<span class="confirm_order_content_danjia">￥<span>{{$v['price']}}</span>.00</span>
				<span class="confirm_order_content_num">{{$v['num']}}</span>
				<span class="confirm_order_content_youhui">
					<!--<select name="">
						<option value="">不使用优惠</option>
						<option value="">5折</option>
						<option value="">9.8折</option>
					</select>-->
				</span>
				<span class="confirm_order_content_xiaoji">￥<span>{{$v['total']}}</span>.00</span>
			</div>
		{{endforeach}}
		<p>您的要求：<textarea name="remark" rows="" style="width: 900px;"></textarea></p>
		
		
		<!--END confirm order -->
		
		
		
		<div class="clear"></div>
		<div class="write_order_info"></div>
	</div>	
	<div class="order_last_info">
		<div class="order_last_info_in">
			<p>实际付款：<span>￥<span>{{$_SESSION['cart']['total']}}</span>.00</span></p>
		</div>
	</div>
	<div class="submit_order">
		<ul>
			<li class="goback">
				<a href="cart.html">返回购物车</a>
			</li>
			<li>
				<input type="image"  type="submit" src="./Public/Home/images/submit_order.jpg"/>
			</li>
		</ul>
		
	</div>
</div>

<!--订单号的隐藏域-->
<input type="hidden" name="number" />
<!--生成时间的隐藏域-->
<input type="hidden" name="time" />
<!--价格总计-->
<input type="hidden" name="total" value="{{$_SESSION['cart']['total']}}" />
<!--用户的uid-->
<input type="hidden" name="wsshop_user_uid" />
</form>


<?php else: ?>	
	
<div class="confirm_order_content_con ">
	<h1 style="text-align: center;font-size: 3em;"><a href="index.html" >亲，您没有订单，请先去购物！</a></h1>
</div>	
	


	
<?php endif ?>





<!--END shoppingCart-->

<!--底部开始-->
<li style="width: 100%;height: auto;overflow: hidden;margin: 0 auto;">{{include file="../Common/footer"}}</li>
<!--底部结束-->	
	</body>
</html>
